package org.fintool.functional;

import org.fintool.common.Constants;
import org.fintool.common.PropertyUtil;

public class FinanceUtilfactory {
	
	
	public static IFinanceUtil getFinanceUtil(){
		
		String modeOverRide=PropertyUtil.getValue(Constants.DEAULT_MODE_OVERRIDE);
		
		String mode=PropertyUtil.getValue(Constants.MODE);
		IFinanceUtil financeUtil=null;
		
		
		if(modeOverRide.equalsIgnoreCase("t")||modeOverRide.equalsIgnoreCase("y")){
			financeUtil=new FinanceUtilDay();
			
		}
		else{
			if(mode.equalsIgnoreCase("s")){
				financeUtil=new FinanceUtilSeconds();
				
			}else{
				financeUtil=new FinanceUtilDay();
			}
			
			
			
		}
		
		return financeUtil;
		
	}
	
	

}
